﻿<?xml version = "1.0"?>
<bindings xmlns = "http://www.mozilla.org/xbl" xmlns:html = "http://www.w3.org/1999/xhtml">

  <binding id = "wordwrap" applyauthorstyles = "false">

    <implementation>
      <constructor>
        //<![CDATA[
            
             var elem = this;

             elem.addEventListener('overflow',
                 function()
                 {
                     var exp = /<​\/*[​_\s="'\w]+>/g;
                    
                     var txt = elem.innerHTML;
                     var chars = txt.split('');
                     var newTxt = chars.join('​');                    
                     newTxt = newTxt.replace(exp, reconstructTag);                    
                     elem.innerHTML = newTxt;
                 },false);
                
                 function reconstructTag(_tag)
                 {
                     return _tag.replace(/​/g, '');
                 }

             //]]>
      </constructor>
    </implementation>
  </binding>

</bindings>
<!-- Web2 -->
